package net.wofly.finance.expense.service;

import java.util.List;
import java.util.Map;

import net.wofly.finance.expense.domain.ExpenseAccount;
import net.wofly.framework.dao.PageWrapper;
import net.wofly.framework.util.ReturnBean;

/**
 * @author lign
 * @version 1.0
 * @created 11-四月-2018 17:30:57
 */
public interface IExpenseAccountService {

	/**
	 * 
	 * @param expenseAccount
	 */
	public ReturnBean<ExpenseAccount> saveExpenseAccount(ExpenseAccount expenseAccount);
	
	/**
	 * 
	 * @param expenseAccount
	 */
	public ReturnBean<ExpenseAccount> save(ExpenseAccount expenseAccount);
	
	/**
	 * 
	 * @param expenseAccount
	 */
	public ReturnBean<ExpenseAccount> updateExpenseAccount(ExpenseAccount expenseAccount);

	/**
	 * 按时间倒序
	 * 
	 * @param startTime
	 * @param endTime
	 */
	public ReturnBean<PageWrapper<ExpenseAccount>> getMyExpenseAccount(String askUserID ,Long startTime, Long endTime, Integer pageNum, Integer pageSize);

	/**
	 * 按时间倒序
	 * 
	 * @param orgID
	 * @param askUserID
	 * @param startTime
	 * @param endTime
	 */
	public ReturnBean<PageWrapper<ExpenseAccount>> getAllExpenseAccount(String orgID, String askUserID, Long startTime, Long endTime, Integer pageNum, Integer pageSize);
	
	/**
	 * 
	 * @param expenseAccountID
	 * @return
	 */
	public ReturnBean<ExpenseAccount> getExpenseAccount(String expenseAccountID);
	
	/**
	 * 
	 * 
	 * @param userId
	 * @param expenseAccountID
	 * @param variables
	 * @return
	 */
	public ReturnBean<String> startWorkflow(String userId ,String expenseAccountID ,Map<String, Object> variables) ;

	/**
	 * 
	 * @param userId
	 * @return
	 */
	public ReturnBean<List<ExpenseAccount>> findToDoList(String userId) ;
	
	/**
	 * 
	 * 
	 * @param userID
	 * @param taskID
	 * @param mapRequest
	 * @return
	 */
	public ReturnBean<String> complete(String userID ,String taskID ,Map<String, String[]> mapRequest);
	
	/**
	 * 
	 * 
	 * @param expenseAccountID
	 * @return
	 */
	public ReturnBean<ExpenseAccount> getExpenseAccountForFlow(String expenseAccountID) ;
	
	/**
	 * 
	 * 
	 * @param expenseAccountID
	 * @return
	 */
	public ExpenseAccount findOne(String expenseAccountID) ;
	
	/**
	 * 
	 * @param processInsIDs
	 * @return
	 */
	 public List<ExpenseAccount> findByInProcessInsID(List<String> processInsIDs) ;
	 
	 /**
	  * 
	  * 
	  * @param processInsId
	  * @return
	  */
	 public ExpenseAccount findByProcessInsID(String processInsId) ;
	 
	 /**
	  * 将信息里类型、用户名、部门名称进行转换，用于前端显示
	  * 
	  * 
	  * @param expenseAccount
	  * @return
	  */
	 public ExpenseAccount transExpenseAccount(ExpenseAccount expenseAccount) ;

}